﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;

namespace WpfNet8Test.ZStatic
{
    internal class XCStatic
    {
        public static string GetDatabasePath()
        {
            var appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
            var appName = Assembly.GetExecutingAssembly().GetName().Name;
            var folderPath = Path.Combine(appData, appName);
            Directory.CreateDirectory(folderPath);
            return Path.Combine(folderPath, "mydatabase.db");
        }

        public static string GetConnectionString()
        {
            return $"Data Source = {GetDatabasePath()}";
        }


        //主页面Frame的引用放在这里
        public static Frame mainFrameStatic = new Frame();
    }
}
